/**
 * WebHttpHandler.js
 * @author Ulyan Sobin
 * @description WebHttpHandler class
 */

"use strict";

const { WebHandler } = require("../WebHandler");
const { WebHttpClient } = require("./WebHttpClient");

class WebHttpHandler extends WebHandler {

	/** @type { function (WebHttpClient) } */
	resolve;

	/**
	 * Constructor of `WebHttpHandler`
	 * @param { function (WebHttpClient) } resolve 
	 */
	constructor (resolve) {
		super();
		this.resolve = resolve;
	}

	/**
	 * 
	 * @param { WebClient } client 
	 */
	route(client) {
		this.resolve(client);
	}
}

module.exports.WebHttpHandler = WebHttpHandler;